import { VxeGridProps } from 'vxe-table';
import { BizStationDataCardHistoryVo } from '@/api/station/dataCard/types';

export function getTableConfig(): VxeGridProps<BizStationDataCardHistoryVo> {
  return {
    id: 'tenant',
    loading: false,
    height: '500px',
    autoResize: true,
    border: 'inner',

    resizable: true,
    showOverflow: 'tooltip',
    stripe: true,
    rowConfig: {
      isHover: true,
      keyField: 'id'
      // height: 56
    },
    customConfig: {
      storage: true
    },
    columns: [
      { sortable: true, field: 'deviceType', title: '绑定设备类型', slots: { default: 'deviceType' } }, // settleStartFrom - settleEndTo
      { sortable: true, field: 'deviceNo', title: '绑定设备' },
      { sortable: true, field: 'regionName', title: '区域）' },
      { sortable: true, field: 'opType', title: '操作', slots: { default: 'optype' } },
      { sortable: true, field: 'createTime', title: '操作时间' },
      { sortable: true, field: 'createBy', title: '操作人(无名称字段)' } // TODO
    ],
    data: [] as BizStationDataCardHistoryVo[]
  };
}
